package com.yuanfeng.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 退回原因 -- 字典表
 * @TableName order_return_reason
 */
@TableName(value ="order_return_reason")
@Data
public class OrderReturnReasonEntity implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer orderReturnReasonId;

    /**
     * 投诉理由内容
     */
    private String orderReturnReasonContent;

    /**
     * 投诉理由排序
     */
    private Integer orderReturnReasonSort;

    /**
     * 投诉类型
     */
    private Integer orderReturnReasonType;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OrderReturnReasonEntity other = (OrderReturnReasonEntity) that;
        return (this.getOrderReturnReasonId() == null ? other.getOrderReturnReasonId() == null : this.getOrderReturnReasonId().equals(other.getOrderReturnReasonId()))
            && (this.getOrderReturnReasonContent() == null ? other.getOrderReturnReasonContent() == null : this.getOrderReturnReasonContent().equals(other.getOrderReturnReasonContent()))
            && (this.getOrderReturnReasonSort() == null ? other.getOrderReturnReasonSort() == null : this.getOrderReturnReasonSort().equals(other.getOrderReturnReasonSort()))
            && (this.getOrderReturnReasonType() == null ? other.getOrderReturnReasonType() == null : this.getOrderReturnReasonType().equals(other.getOrderReturnReasonType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getOrderReturnReasonId() == null) ? 0 : getOrderReturnReasonId().hashCode());
        result = prime * result + ((getOrderReturnReasonContent() == null) ? 0 : getOrderReturnReasonContent().hashCode());
        result = prime * result + ((getOrderReturnReasonSort() == null) ? 0 : getOrderReturnReasonSort().hashCode());
        result = prime * result + ((getOrderReturnReasonType() == null) ? 0 : getOrderReturnReasonType().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", orderReturnReasonId=").append(orderReturnReasonId);
        sb.append(", orderReturnReasonContent=").append(orderReturnReasonContent);
        sb.append(", orderReturnReasonSort=").append(orderReturnReasonSort);
        sb.append(", orderReturnReasonType=").append(orderReturnReasonType);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}